import { createRouter, createWebHistory } from "vue-router";
import TabView from "@/layouts/TabView.vue";
import BlackView from "@/layouts/BlackView.vue"

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/",
      name: "工作台",
      component: TabView,
      redirect: "/home",
      children: [
        {
          path: "/home",
          name: "统计",
          component: () => import("@/views/home/index.vue"),
          meta: {
            roles: []
          }
        },
        {
          path: "/curriculum",
          name: "课程管理",
          component: BlackView,
          children: [
            {
              path: "",
              component: () => import("@/views/curriculum/index.vue"),
            },
            {
              path: "curriculumDetail",
              component: () => import("@/views/curriculum/curriculumDetails.vue"),
            },
          ]
        },
        {
          path: "/accountNumber",
          name: "账号管理",
          component: BlackView,
          children:[
            {
              path: "",
              name: "账号列表",
              component: () => import("@/views/accountNumber/index.vue")
            },
            {
              path: "accountNumberDetail",
              name: "账号详情",
              component: () => import("@/views/accountNumber/accountNumberDetail.vue")
            },

          ]
        },
        {
          path: "/classList",
          name: "班级列表",
          component: BlackView,
          children:[
            {
              path: "",
              name: "",
              component: () => import("@/views/classList/index.vue")
            },
            {
              path: "classDetail",
              name: "班级列表",
              component: () => import("@/views/classList/classesDetail.vue")
            }
          ]
        }

      ]
    },
    {
      path: "/about",
      name: "about",
      component: () => import("../views/AboutView.vue")
    }
  ]
});

export default router;
